Solutions

Creating a Solution

knowledgewright4/samples/support/tutorial/printer_1.kb

First, we will build a knowledgebase with one solution. This knowledgebase diagnoses printer problems. During the course of this tutorial we will expand this into a more complete system.

Our first solution checks if the printer is powered on.

  1. Use Object/New to create a new solution named power.
  2. Leave the priority set to 1. We don't need an environment because this problem applies to all types of printers.
  3. Set the conditions to: symptom = "no output" and powered_on = "no".
  4. Set the problem to "The printer needs power to operate." and the fix to "Plug in the printer and turn it on."

Add the Questions

The values for symptom and powered_on come from the user. To ask, we need two questions. Using the Object/New menu, create two question objects with these attributes:

id
symptom
path
/
prompt
What problem are you experiencing?
question_type
menu_single_choice
question_style
listbox
choices
    
no output
light output
no color
default
  
ask_also
   
id
powered_on         
path
/
prompt
Is the printer plugged in and turned on?
question_type
menu_single_choice
question_style
listbox
choices
    
yes
no
default
  
ask_also
   

Run the Knowledgebase

Select Run/Run to test your knowledgebase. Select "no_output" as the symptom and "no" to powered_on. The power solution should be displayed.

Exercises

  1. Examine the log window to see how the reasoning engine walks through the environment and conditions to match them.
  2. Try setting the Run/Log Detail to High and examine the log again.
  3. See how no solution is found by giving different answers to the questions.

Copyright ©1996-2002 Amzi! inc. All Rights Reserved. Amzi!, KnowledgeWright and WebLS are registered trademarks and Subscription Plus and Logic Server are trademarks of Amzi! inc.